import request from '@/utils/request'

// 发布新救助
export function publishRescue(data) {
  return request({
    url: '/forum',
    method: 'post',
    data
  })
}
// 获取救助列表
export function getRescueList(data) {
  return request({
    url: '/forum',
    method: 'GET',
    params: data
  })
}
// 获取帖子详情
export function getPostDetail(id) {
  return request({
    url: `/forum/${id}`,
    method: 'GET'
  })
}
// 批量删除帖子
export function batchDeletePosts(data) {
  return request({
    url: '/forum/batch',
    method: 'DELETE',
    params: {
      ids: data
    }
  })
}
